<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/sys-tags" prefix="sys" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

<title><s:text name="title_resourceInfoList3"></s:text></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<base target="_self" />
<%@ include file="../common/header.jsp"%>
<link href="${appPath}/css/nav.css"rel="stylesheet" type="text/css" />
<link href="${appPath}/css/resourceInfoList.css"rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${appPath}/js/resourceInfoList.js"></script>
<script type="text/javascript" src="${appPath}/js/area.js"></script>
<script type="text/javascript">

function selectArea(areaID,languageID){
	$("#languageId").val(languageID);
	$("#areaId").val(areaID);
	$("div2").html();
}
$(function(){	
	selectAreaMap();	
});
</script>
</head>
<body>
<%@ include file="../common/nav.jsp" %>


<!--一览 -->
<div id="content5" class="content">
<p class="space2"></p>
<h1 class="font2" style="margin-left:50px"><s:text name="label_resourceInfoList"/>
&nbsp;&nbsp;&nbsp;&nbsp;</h1>
<p align="right">
<!-- <input type="button" value="返回" style="margin-left: 60px" class="button1"  id="returnBt"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 --><input type="button" value="<s:text name="button_addGoods"/>" style="margin-right: 60px" class="button1"  id="addResourceInitBt"/>
</p>
<hr width="860px">
<p class="space1"></p>
<table style="background: white; width:860px;margin-left: auto; margin-right: auto;" cellspacing="0">
<thead>
<tr bgcolor="#bbbbbb">
<td height="60px" width="192px" align="center" class="font1"><s:text name="label_resourcesPicture"/></td>
<td width="192px" align="center" class="font1"><s:text name="label_resourcesType"/></td>
<td width="192px" align="center" class="font1"><s:text name="label_goodsArea"/></td>
<td width="192px" align="center" class="font1" ><s:text name="label_goodsPrice"/></td>
<td width="192px" align="center" class="font1"></td>
</tr>
</thead>
<tbody >
<s:iterator value="goodsList" id="goodsList" status="listStatus">
	<s:if test="#listStatus.odd == true">
	<tr bgcolor="#f1f1f1">
	<td width="192px" align="center">
	<div class="imgborder1">
	<sys:image width="100" height="100" imagePath="/${goods_img}"/>
	</div>
	</td>
	<td width="192px" align="center"><s:label value="%{resource_descriptionx}"/>  </td>
	<td width="192px" align="center"><s:label value="%{area_name}"/>  </td>
	<td width="192px" align="center"><s:label value="%{price}"/><s:label value="%{currency_mark}"/>   </td>
	<td width="192px" align="center"><a href="${appPath}/webgoods/updateResourceInfoInit.action?goodsid=<s:property value="%{goods_id}"/>"  class="modifyGoodsInfoInit"><s:text name="label_modify"/></a></td>
	</tr>
	</s:if>
	
	<s:else>
    <tr bgcolor="#cccccc">
	<td width="192px" align="center">
	<div class="imgborder2">
	<sys:image width="100" height="100" imagePath="/${goods_img}"/>
	</div>
	</td>
	<td width="192px" align="center"><s:label value="%{resource_descriptionx}"/>  </td>
	<td width="192px" align="center"><s:label value="%{area_name}"/>  </td>
	<td width="192px" align="center"><s:label value="%{price}"/><s:label value="%{currency_mark}"/>   </td>
	<td width="192px" align="center"><a href="${appPath}/webgoods/updateResourceInfoInit.action?goodsid=<s:property value="%{goods_id}"/>"  class="modifyGoodsInfoInit"><s:text name="label_modify"/></a></td>
	</tr>
	</s:else>
</s:iterator>
</tbody>
</table>
<p class="space1"></p>
</div>


<div id="content1">

<table >

<tbody>
<s:iterator value="resourceList" id="resourceList" status="listStatus">
	<td width="190px" align="center"><a href="#"  class="resourceInfoInit"><sys:image width="100" height="100" imagePath="/${img}"/></a><s:hidden value="%{resource_type_id}"/>
	</td>
</s:iterator>

</tbody>
</table>
</div> 
<p></p>



	<div id="content" class="content">
	<p class="space2"></p>
		<h1 class="font1" style="margin-left: 50px">
		
		<s:if test='initFlag=="1"'>
		<s:text name="title_resourceInfoList2"></s:text>&nbsp;&nbsp;&nbsp;&nbsp;
		</s:if>
		<s:else>
		<s:text name="title_resourceInfoList"></s:text>&nbsp;&nbsp;&nbsp;&nbsp;	
		</s:else>
		</h1>
		<hr width="860px">
		<p class="space1"></p>
			<s:form action="" id="resourceForm" enctype="multipart/form-data" method="post" >
				<table>
					<tr>
						<td width="150px" align="right" class="font1" >
						
							<s:text name="label_area"></s:text>&nbsp;&nbsp;&nbsp;&nbsp;
				
						
				
							</td>
						    <td width="810px" align="left">
							<div id="selectmapArea">
								<div id="backButton"></div>
											
							<div id="selectedInfo"></div>
				
 							<sys:image imagePath="/area/world.jpg\" id=\"areimg\"  usemap=\"#areaMap" ></sys:image>    
				     
			  
							<!--<img alt="map" src="${appPath}/images/area/world.jpg" usemap="#areaMap" id="areimg"  class="aa"/-->
				  
				            <map name="areaMap" id="areaMap" class="aa"  >
				            </map>
				            <s:textfield type="hidden" name="language_id" id="languageId"></s:textfield>
				            <s:textfield type="hidden" name="area_id" id="areaId"></s:textfield>
				    <s:hidden id="childId" value="%{area_id}"></s:hidden>
				    <s:hidden id="mapFlag" value="%{mapFlag}"></s:hidden>
							</div>
							<div id="areaName"></div>
							<s:fielderror fieldName="area_id"  cssClass="errormessage"></s:fielderror>	
						</td>
					
					</tr>
					<tr>
						<td align="right" height="100px" class="font1">
							<s:text name="label_rent"></s:text>&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td align="left"><s:textfield id="priceForResource" name="priceForResource" value="%{priceForResource}" maxlength="8"/> &nbsp;
							<s:select id="currencyUnitId" name="currency_unit_id"
								list="currencyUnitIdMap" listKey="key" listValue="value" />
							<s:fielderror fieldName="priceForResource" cssClass="errormessage"></s:fielderror>	
								
								</td>

					</tr>

					<tr>
						<td align="right" class="font1" height="50px"><s:text name="label_useState"></s:text>&nbsp;&nbsp;&nbsp;&nbsp;</td>
					<!-- <s:set name="statusForResource1" value="%{getText('label_statusForResource1')}"></s:set>
						<s:set name="statusForResource2" value="%{getText('label_statusForResource2')}"></s:set>-->	
						<s:set var="statusForResource1" value="%{getText('label_statusForResource1')"></s:set>
						<s:set var="statusForResource2" value="%{getText('label_statusForResource2')"></s:set>
						<td align="left"><s:radio id="statusForResource" name="statusForResource" list="%{#{'1':#statusForResource1,'0':#statusForResource2}}" value="%{statusForResource}" theme="simple"></s:radio> 
					<!-- 	<input type="radio" id="statusForAble"
							name="statusForResource" value="0" />可用 <input type="radio"
							id="statusForUnable" name="statusForResource" value="1" />不可用  -->
							<input
							type="hidden" id="status" name="status" />
							<s:hidden name="goodsIdForModify" id="goodsIdForModify" value="%{goodsIdForModify}"/>
							<s:hidden id="resourceTypeId" value="%{resourceTypeId}"/>
							</td>
					</tr>
					<%-- <tr>
						<td align="right" class="font1" height="100px">图片写真
							&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><s:file name="file" theme="simple"></s:file></td>
					</tr> --%>
					<tr>
					<td align="right" class="font1" height="80px"><s:text name="label_resourcesPicture"></s:text>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<%--			<s:hidden id="fileFileName" value="%{fileFileName}" name="fileFileName"/>
						<s:set name="fileFileName" value="%{fileFileName}" />
						<s:if test="#fileFileName==null || #fileFileName==''">
							<td width="560px" height="40px" colspan="3" align="left"><s:text name="label_noPicture"></s:text></td>
						</s:if>
						<s:else>
						  <td width="560px" height="100px" colspan="3" align="left">
						  <!--<img alt="" width="100" height="100" src="${appPath}/images/resourcePhotos/jp/<s:property value="fileFileName"/>"/>
								-->	
								<sys:image width="100" height="100" imagePath="/${fileFileName}"/>
								</td>
						</s:else>
	  --%>
   
	<td width="560px" height="40px" align="left" >
	<s:file name="file" theme="simple"></s:file> 
	<s:fielderror fieldName="file"  cssClass="errormessage"></s:fielderror>  
		<s:hidden id="initFlag" value="%{initFlag}"></s:hidden>
		<s:hidden id="goods_id" value="%{goods_id}"></s:hidden>
	<s:if test='initFlag=="1"'>
	<tr>
	<td></td>
	<td id="goodsImgCss" align="left">
	<s:if test='goods_img==null'>
	<s:text name="label_noPicture"></s:text>
	</s:if>
	<s:else>
	<sys:image imagePath="${goods_img}" ></sys:image>
	</s:else>
	<s:hidden id="goods_img" value="%{goods_img}"></s:hidden>
	</td>
	</tr>
	</s:if>
	  </td>
					</tr>
		<tr>
		<td align="right" class="font1" height="80px"><s:text name="label_resourcesType"></s:text>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		
		<td width="560px" height="40px" align="left"> <s:textfield type="text" readonly="true"  cssClass="TxtNoEdit" id="email" value="%{resourceType_descriptionx}" name="resourceType_descriptionx"  onfocus="this.blur()"/></td>
		</tr>			
					<tr>
						<td align="right" class="font1"><s:text name="label_Remarks"></s:text> &nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td height="80px" align="left"><s:textarea style="width: 500px;" rows="3"
								cols="20" id="descriptionx" name="descriptionx" value="%{descriptionx}" maxlength="200"/>
								<s:fielderror fieldName="descriptionx"></s:fielderror>
								</td>
					</tr>
					<tr>
						<td width="480px" height="100px" align="center" colspan="2">
						<s:if test='initFlag=="1"'>
											<input type="button" id="updateConfirm" value="<s:text name="label_SureButton"></s:text>" class="button1" />
						</s:if>
						<s:else>
						<input type="button" id="confirm" value="<s:text name="label_SureButton"></s:text>" class="button1" />
						</s:else>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<!-- <input type="button" id="return" value="返回" class="button1" /> --></td>
					</tr>
				</table>
</s:form>
		
<s:form></s:form>
	</div>

	<pre>
</pre>
<p class="space1"></p>
</body>
</html>